package com.jwj.Dao;

import com.jwj.pojo.Category;
import com.jwj.pojo.CategoryTable;
import com.jwj.pojo.Category_account;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CategoryDao {
//    查单表单字段
    List<CategoryTable> CategoryTable();
    //查找所有category信息
    /**
     *
     * @return
     */
    List<Category_account> CategoryAll();

    //添加category信息
    /**
     *
     * @param category
     * @return
     */
    int AddCategory(Category category);
    //根据id删除一个数据

    /**
     *
     * @param category_id
     * @return
     */
    int DeleteCategory(int category_id);
    //根据id修改

    /**
     *
     * @param category
     * @return
     */
    int UpdateCategory(Category category);
    //根据id查找

    /**
     *
     * @param category_id
     * @return
     */
    Category toFindCategory(int category_id);
    //根据状态查找

    /**
     *
     * @param state
     * @return
     */
    List<Category_account> toFindState(String state);
}
